-
Notifications
You must be signed in to change notification settings - Fork 85
Add git workflow cursor rule #1544
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
WalkthroughAdds a new Git workflow policy document at Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes
Suggested labels
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
.cursor/rules/502-git-workflow.mdc(1 hunks).cursor/rules/README.md(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
.cursor/rules/*.mdc
📄 CodeRabbit inference engine (.cursor/rules/README.md)
.cursor/rules/*.mdc: Rule file format must use MDC (Markdown with frontmatter) containing: name, description, globs array, and optional alwaysApply boolean
Reference conventions via [CONV:*] anchors defined within rule files rather than relying on external Markdown files
Define specific glob patterns in rules to target file types precisely and avoid unnecessary activation; avoid overly broad patterns like */
Files:
.cursor/rules/502-git-workflow.mdc
🧠 Learnings (21)
📓 Common learnings
Learnt from: mirooon
Repo: lifinance/contracts PR: 1187
File: .github/workflows/versionControlAndAuditCheck.yml:596-612
Timestamp: 2025-06-05T11:25:43.443Z
Learning: The user mirooon has an internal system for tracking tickets and technical debt. They acknowledged the security concern about disabled commit hash verification in the audit workflow and plan to implement conditional logic to skip verification only for revert PRs in a future update.
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/README.md:0-0
Timestamp: 2025-12-17T10:30:42.081Z
Learning: Applies to .cursor/rules/50[0-1]-*.mdc : GitHub Actions rule activations: Use glob patterns .github/workflows/**/*.yml and .github/workflows/**/*.yaml for workflow files
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/500-github-actions.mdc:0-0
Timestamp: 2025-12-17T10:30:08.145Z
Learning: Applies to .github/workflows/**/*.{yml,yaml} : Check for existing PR comments before creating new ones; use Markdown for readability with headers, lists, and code blocks
Learnt from: 0xDEnYO
Repo: lifinance/contracts PR: 853
File: .github/workflows/protectSecurityRelevantCode.yml:78-78
Timestamp: 2024-11-08T03:42:16.803Z
Learning: In the `.github/workflows/protectSecurityRelevantCode.yml` file, ensure that any suggested code changes are secure, thoroughly vetted for potential issues, and do not prompt further modifications to previously recommended code.
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/README.md:0-0
Timestamp: 2025-12-17T10:30:42.081Z
Learning: Applies to .cursor/rules/*.mdc : Rule file format must use MDC (Markdown with frontmatter) containing: name, description, globs array, and optional alwaysApply boolean
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/README.md:0-0
Timestamp: 2025-12-17T10:30:42.081Z
Learning: Applies to .cursor/rules/[0-9]{3}-*.mdc : Organize rule files with numeric prefixes by category: 000-099 (Global/standards), 100-199 (Solidity), 200-299 (TypeScript), 300-399 (Bash), 400-499 (Testing), 500-599 (Git/GitHub Actions/Audit), 600-699 (Mixed)
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/README.md:0-0
Timestamp: 2025-12-17T10:30:42.081Z
Learning: Applies to .cursor/rules/*.mdc : Define specific glob patterns in rules to target file types precisely and avoid unnecessary activation; avoid overly broad patterns like **/*
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/README.md:0-0
Timestamp: 2025-12-17T10:30:42.081Z
Learning: Use /add-new-rule command as the standard workflow for adding or updating rules and commands
Learnt from: mirooon
Repo: lifinance/contracts PR: 1328
File: docs/LDAPeripheryRegistryFacet.md:14-27
Timestamp: 2025-08-29T14:05:25.335Z
Learning: mirooon prefers interface-level documentation to focus on the API contract and function purposes rather than implementation details like access control restrictions or specific modifiers, keeping documentation clean and consumable at the interface level.
📚 Learning: 2025-12-17T10:30:42.081Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/README.md:0-0
Timestamp: 2025-12-17T10:30:42.081Z
Learning: Applies to .cursor/rules/*.mdc : Rule file format must use MDC (Markdown with frontmatter) containing: name, description, globs array, and optional alwaysApply boolean
Applied to files:
.cursor/rules/502-git-workflow.mdc.cursor/rules/README.md
📚 Learning: 2025-12-17T10:30:42.081Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/README.md:0-0
Timestamp: 2025-12-17T10:30:42.081Z
Learning: Applies to .cursor/rules/50[0-1]-*.mdc : GitHub Actions rule activations: Use glob patterns .github/workflows/**/*.yml and .github/workflows/**/*.yaml for workflow files
Applied to files:
.cursor/rules/502-git-workflow.mdc.cursor/rules/README.md
📚 Learning: 2025-12-17T10:30:08.145Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/500-github-actions.mdc:0-0
Timestamp: 2025-12-17T10:30:08.145Z
Learning: Applies to .github/workflows/**/*.{yml,yaml} : Check for existing PR comments before creating new ones; use Markdown for readability with headers, lists, and code blocks
Applied to files:
.cursor/rules/502-git-workflow.mdc.cursor/rules/README.md
📚 Learning: 2025-12-17T10:30:42.081Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/README.md:0-0
Timestamp: 2025-12-17T10:30:42.081Z
Learning: Applies to .cursor/rules/*.mdc : Define specific glob patterns in rules to target file types precisely and avoid unnecessary activation; avoid overly broad patterns like **/*
Applied to files:
.cursor/rules/502-git-workflow.mdc.cursor/rules/README.md
📚 Learning: 2025-12-17T10:30:42.081Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/README.md:0-0
Timestamp: 2025-12-17T10:30:42.081Z
Learning: Applies to .cursor/rules/[0-9]{3}-*.mdc : Organize rule files with numeric prefixes by category: 000-099 (Global/standards), 100-199 (Solidity), 200-299 (TypeScript), 300-399 (Bash), 400-499 (Testing), 500-599 (Git/GitHub Actions/Audit), 600-699 (Mixed)
Applied to files:
.cursor/rules/502-git-workflow.mdc.cursor/rules/README.md
📚 Learning: 2025-12-17T10:30:42.081Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/README.md:0-0
Timestamp: 2025-12-17T10:30:42.081Z
Learning: Applies to .cursor/rules/*.mdc : Reference conventions via [CONV:*] anchors defined within rule files rather than relying on external Markdown files
Applied to files:
.cursor/rules/502-git-workflow.mdc
📚 Learning: 2025-12-17T10:30:08.145Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/500-github-actions.mdc:0-0
Timestamp: 2025-12-17T10:30:08.145Z
Learning: Applies to .github/workflows/**/*.{yml,yaml} : Check base branch targeting using condition: `if: ${{ github.event.pull_request.base.ref == 'main' }}`
Applied to files:
.cursor/rules/502-git-workflow.mdc
📚 Learning: 2025-05-27T12:36:26.987Z
Learnt from: 0xDEnYO
Repo: lifinance/contracts PR: 1168
File: script/deploy/_targetState.json:1564-1589
Timestamp: 2025-05-27T12:36:26.987Z
Learning: When reviewing deployment PRs in the lifinance/contracts repository, target state configuration files (like script/deploy/_targetState.json) may be updated for multiple networks even when the PR is focused on deploying to a specific network. The scope should be determined by the PR title and description, not just by all configuration changes present in the files.
Applied to files:
.cursor/rules/502-git-workflow.mdc
📚 Learning: 2025-07-03T01:44:43.968Z
Learnt from: 0xDEnYO
Repo: lifinance/contracts PR: 1237
File: conventions.md:56-60
Timestamp: 2025-07-03T01:44:43.968Z
Learning: Always consult the conventions.md file for the latest rules and conventions when reviewing PRs or code changes in the lifinance/contracts repository. Make suggestions when code changes do not match the documented conventions in this file.
Applied to files:
.cursor/rules/502-git-workflow.mdc
📚 Learning: 2025-12-17T10:30:08.145Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/500-github-actions.mdc:0-0
Timestamp: 2025-12-17T10:30:08.145Z
Learning: Applies to .github/workflows/**/*.{yml,yaml} : Keep workflows focused on single responsibilities for maintainability
Applied to files:
.cursor/rules/502-git-workflow.mdc
📚 Learning: 2025-12-17T10:30:08.145Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/500-github-actions.mdc:0-0
Timestamp: 2025-12-17T10:30:08.145Z
Learning: Applies to .github/workflows/**/*.{yml,yaml} : Every workflow file must start with a clear header comment block describing: purpose, triggers (events/branches/paths), key behaviors, and known limitations
Applied to files:
.cursor/rules/502-git-workflow.mdc
📚 Learning: 2025-12-17T10:30:08.145Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/500-github-actions.mdc:0-0
Timestamp: 2025-12-17T10:30:08.145Z
Learning: Applies to .github/workflows/**/*.{yml,yaml} : Use descriptive artifact names (e.g., `contracts_for_audit`) and initialize empty files to prevent upload failures
Applied to files:
.cursor/rules/502-git-workflow.mdc.cursor/rules/README.md
📚 Learning: 2025-12-17T10:30:42.081Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/README.md:0-0
Timestamp: 2025-12-17T10:30:42.081Z
Learning: Use /add-new-rule command as the standard workflow for adding or updating rules and commands
Applied to files:
.cursor/rules/README.md
📚 Learning: 2025-12-17T10:27:39.700Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/099-finish.mdc:0-0
Timestamp: 2025-12-17T10:27:39.700Z
Learning: In summary format: Start with applied rules (filename/anchor), include tests/lints run, call out follow-ups/gaps
Applied to files:
.cursor/rules/README.md
📚 Learning: 2025-08-07T10:20:01.383Z
Learnt from: mirooon
Repo: lifinance/contracts PR: 1283
File: deployments/ronin.diamond.json:65-68
Timestamp: 2025-08-07T10:20:01.383Z
Learning: When analyzing deployment PRs in the lifinance/contracts repository, carefully verify that target state configuration files (like script/deploy/_targetState.json) and deployment log files have been updated before flagging missing entries. The AI summary section should be consulted to understand all file changes, as manual searches might miss entries due to formatting differences or search limitations.
Applied to files:
.cursor/rules/README.md
📚 Learning: 2025-12-17T10:30:42.081Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/README.md:0-0
Timestamp: 2025-12-17T10:30:42.081Z
Learning: Applies to .cursor/rules/10[0-7]-*.mdc : Solidity rule activations: Use glob pattern **/*.sol for all Solidity files, src/**/*.sol for production contracts (excluding test and script files), src/Facets/**/*.sol for facets, src/Interfaces/**/*.sol for interfaces
Applied to files:
.cursor/rules/README.md
📚 Learning: 2025-12-17T10:30:42.081Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/README.md:0-0
Timestamp: 2025-12-17T10:30:42.081Z
Learning: Applies to .cursor/rules/40[0-2]-*.mdc : Testing rule activations: Use glob patterns test/**/*.t.sol for Solidity tests, **/*.test.ts for TypeScript tests, and test/**/*.t.sol + **/*.test.ts + script/**/*.ts for cross-language testing rules
Applied to files:
.cursor/rules/README.md
📚 Learning: 2025-12-17T10:30:42.081Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/README.md:0-0
Timestamp: 2025-12-17T10:30:42.081Z
Learning: Applies to .cursor/rules/200-*.mdc : TypeScript rule activations: Use glob patterns script/**/*.ts and tasks/**/*.ts for TypeScript scripting and helper files
Applied to files:
.cursor/rules/README.md
📚 Learning: 2025-12-17T10:30:20.053Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/501-audits.mdc:0-0
Timestamp: 2025-12-17T10:30:20.053Z
Learning: Applies to .github/workflows/*{audit,version}*.yml : CI workflows must enforce audit-log and audit-report expectations through automated verification in `.github/workflows/versionControlAndAuditCheck.yml`
Applied to files:
.cursor/rules/README.md
📚 Learning: 2025-12-17T10:30:20.053Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/501-audits.mdc:0-0
Timestamp: 2025-12-17T10:30:20.053Z
Learning: Applies to src/**/*.sol : All contracts in `src/` require audits except Interfaces in `src/Interfaces/**` (type definitions only) and external dependencies in `lib/`
Applied to files:
.cursor/rules/README.md
🪛 LanguageTool
.cursor/rules/README.md
[uncategorized] ~110-~110: The official name of this software platform is spelled with a capital “H”.
Context: ... conventions | ❌ On match | .git/**, .github/pull_request_template.md, `.github/**/...
(GITHUB)
[uncategorized] ~110-~110: The official name of this software platform is spelled with a capital “H”.
Context: ..., .github/pull_request_template.md, .github/**/.md, **/*.md` ...
(GITHUB)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: run-unit-tests
- GitHub Check: enforce-min-test-coverage
- GitHub Check: run-unit-tests
🔇 Additional comments (2)
.cursor/rules/502-git-workflow.mdc (2)
1-10: Rule structure compliant; glob patterns require revision (see README comment).The MDC format is well-structured with proper frontmatter (name, description, globs, alwaysApply) and the rule content is clear and well-organized. However, the glob patterns (lines 4–8) inherit the overly-broad scope issue flagged in the README. Coordinate the fix there.
12-40: Git workflow guidance is clear and well-documented.The rule content effectively covers:
- Clear branching model with Jira ticket requirements (lines 14–20)
- Sensible PR targeting defaults with rationale (lines 22–30)
- Well-motivated exceptions for config files (lines 32–40)
The guidance strikes a good balance between prescriptive branching conventions and pragmatic allowance for large-topic multi-PR workflows.
Which Jira task belongs to this PR?
Why did I implement it this way?
Checklist before requesting a review
Checklist for reviewer (DO NOT DEPLOY and contracts BEFORE CHECKING THIS!!!)